package com.bolt.admin.security.shiro.session;

import com.bolt.admin.security.shiro.OnlineBean;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.shiro.session.mgt.SimpleSession;

import java.util.Date;

@Data
public class OnlineSession extends SimpleSession  implements OnlineBean {
    /**
     * 用户ID
     */
    private String userId;

    /**
     * 用户名
     */
    @ApiModelProperty(notes = "用户名")
    private String userName;

    /**
     *  姓名
     */
    @ApiModelProperty(notes = "姓名")
    private String nickName;

    /**
     * 部门
     */
    @ApiModelProperty(notes = "部门")
    private String orgName;

    /**
     * 浏览器
     */
    @ApiModelProperty(notes = "浏览器")

    private String browser;

    /**
     * 登录IP
     */
    @ApiModelProperty(notes = "登录IP")
    private String ip;

    /**
     * 地址
     */
    @ApiModelProperty(notes = "地址")
    private String address;

    /**
     * token
     */
    @ApiModelProperty(notes = "token")
    private String key;

    /**
     * 登录时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd hh:ss:mm", timezone = "GMT+8")
    @ApiModelProperty(notes = "登录时间")
    private Date loginTime;


    @ApiModelProperty(notes = "客户端操作系统")
    private String os;

}

 